﻿using System;
using System.IO;
using Global;

namespace Helper
{
    public static class FileHelper
    {
        public static void Copy(string sourcePath, string desPath)
        {
            try
            {
                // Try to copy with overwrite mode is true
                File.Copy(sourcePath, desPath, true);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        public static void CreateNewProfile(string desPath)
        {
            var sourcePath = AppDomain.CurrentDomain.BaseDirectory + @"Database\" + Constant.BLANK_PROFILE_FILE;
            try
            {
                // Try to copy with overwrite mode is true
                File.Copy(sourcePath, desPath, true);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
    }
}
